<div class="colRmargin page-login">
<h1 class="guide">上传/编辑我的头像</h1>
<form enctype="multipart/form-data" action="" method="post" id="postBuyRequestForm" name="postBuyRequestForm" class="ui-form ui-form-horizontal ui-form-grouping" >
<fieldset class="ui-form-group" id="product-basic" style="height:450px;">
	<legend class="br-group-title"></legend>
    <div class="ui-form-item" id="detail">
		
		<label for="detailTextarea" class="ui-form-label">
			<m class="ui-form-required"></m>
            <span class="J-label"><br /></span>
		</label>
		<div class="ui-form-control">
			<div class="remaining-number" id="remainingNumber"><span class="remark-alert" id="countDown"></span> </div>
		</div>
	</div>
    <div class="ui-form-item">
		<label for="quantityAnnual" class="ui-form-label">用户头像:</label>
		<div class="ui-form-control">
        	<div><img id="my_img" src="" /></div>
			<input type="hidden" id="pic" value="<?php echo $user_info['my_pic']; ?>" name="pic[]" class="ui-textfield ui-textfield-system ui-control-m" maxlength="250" /> 
			<input type="button" id="image" value="上传/选择图片" />　<span class="remark-alert" id="countDown">图片最大200K[</span>
			<span class="remark-alert" id="countDown">]</span>
		</div>
	</div>
	<div class="ui-form-item" id="attachment">
		<label class="ui-form-label J-label"></label>
		<div class="ui-form-control">			
			<div class="ui-uploader-common-file" id="file-uploader-container">
                
                <div class="ui-form-help J-guide">
                    <span class="remark-alert"></span> 最大支持 <span class="remark-alert"></span><span class="remark-alert">200k</span>
                </div>
                <div style="margin-top: 8px;" id="file-uploader-list"><div class="ui-uploader-file" data-widget-cid="widget-14">
                    <ul data-role="uploader-list" class="ui-uploader-file-list util-clearfix"></ul>
                    <p data-role="uploader-error-msg" style="display:none;" class="ui-form-help ui-feedback ui-feedback-addon ui-feedback-error ui-feedback-body"></p>
                	</div>
                </div>
            </div>
		</div>
	</div>
 	<div class="ui-form-item">
		<label class="ui-form-label"></label>
		<div class="ui-form-control"></div>
        <label class="ui-form-label"></label>
        <div class="ui-form-control"></div>
        <label class="ui-form-label"></label>
        <div class="ui-form-control"></div>
	</div>
    <div class="ui-form-item" id="detail">
		<label for="detailTextarea" class="ui-form-label">
			<m class="ui-form-required"></m>
            <span class="J-label"></span>
		</label>
		<div class="ui-form-control">
			<div class="remaining-number" id="remainingNumber"><span class="remark-alert" id="countDown"></span></div>
		</div>
	</div>
	<div class="ui-form-item"></div>
</fieldset>		      
</form>
</div>
<script language="javascript">
KindEditor.ready(function(K) {
	var editor = K.editor({
		uploadJson       : '<?php echo $ulpoad_url; ?>',
		fileManagerJson  : '<?php echo $this->config->base_url('user/userimgmanager?types=my_pic');?>',					
		allowFileManager : true,
		formatUploadUrl  : false,
		allowMediaUpload : false
	});
	K('#image').click(function() {
		editor.loadPlugin('image', function() {
			editor.plugin.imageDialog({
				imageUrl : K('#pic').val(),
				clickFn : function(url, title, width, height, border, align) {
					K('#pic').val(url);
					K('#my_img').attr('src', url);
					editor.hideDialog();
					showMsg('上传成功！');
				}
			});
		});
	});
});
</script>